<!DOCTYPE html>
<html>
<head>
	
	<title><?php echo _MANAGER_TITLE_; ?></title>

	<?php $this->setFlag('list,vue'); ?>
	<?php $this->import('meta'); ?>

	<link rel="stylesheet" type="text/css" href="html/manager/wechat/css/tweet.css?v=11" />

    <script type="text/javascript" src="html/manager/wechat/js/tweet.js?v=14"></script>

</head>
<body>

	<div id="mainBg" class="bg" style="display: none;">

		<input type="text" id="sortationInfo" class="display-none" />
		<input type="text" id="tempid" class="display-none" />
		<input type="text" id="menuid" class="display-none" />

		<div class="title-bar2">
            <div class="title2">推文内容管理</div>
            <button id="createTweetBtn" type="button" class="layui-btn btnAdd" style="display: none;" onclick="createTweet()">生成推文</button>
        	<button id="deleteAllBtn" type="button" class="layui-btn layui-btn-danger btnDel" style="display: none;" onclick="deleteAllInfo()">全部删除</button>
        </div>

        <div class="options-bar">
        	<div class="options-row">
        		<div class="options-row-left">栏目分类：</div>
				<div id="sortationOptions" class="options-row-right">
				</div>
        	</div>
        </div>

        <div class="tongji-bar">
            <span class="tongji">共<span id="listCount" class="tc1">0</span>条信息</span>
        </div>

        <div id="listBar" class="table-bar">
        	<table class="table-box">
        		<tr class="tr-head">
                    <td class="td-head">信息标题</td>
                    <td class="td-head hw3">分类</td>
                    <td class="td-head hw4">推选时间</td>
                    <td class="td-head hw2">操作</td>
                </tr>
                <tr class="tr-item" v-for="info in list">
                    <td class="td-item-left">{{ info.title }}</td>
                    <td class="td-item-center hw3">{{ info.sortation }}</td>
                    <td class="td-item-center hw4">{{ info.pushtime }}</td>
                    <td class="td-item-center hw2">
                    	<template v-if="permission.deleteinfo == 'yes'">
                    		<span class="item-delete" v-on:click="deleteInfo(info.infoid)">删除</span>
                    	</template>
                    </td>
                </tr>
        	</table>
        </div>

        <?php $this->import('page'); ?>
        <?php $this->import('options'); ?>
        <?php $this->import('copy'); ?>

        <script type="text/javascript">
        	var tweet = new Vue({
	            el: '#listBar',
	            data: {
	                list: '',
	                permission: ''
	            }
	        });
        </script>

        <div id="writeBar1" style="display: none;">
            <div class="write-bar">
                <div id="writeTitle" class="write-title">标题设置</div>
                <div class="write-content">
                    <div class="write-tr1">
                        <div class="write-field1">栏目分类：</div>
                        <div class="write-value1">
                        	<select id="sortation" class="write-select2" onchange="createTitle()">
                                <option value="">请选择</option>
                            </select>
                            <span class="write-button3" onclick="resetTitle()">重置</span>
                        </div>
                    </div>
                    <div class="write-tr1">
                        <div class="write-field1">推文标题：</div>
                        <div class="write-value1">
                            <input type="text" id="tweetTitle" class="write-input2" readonly="readonly" placeholder="请生成推文标题" autocomplete="off" />
                            <input type="text" id="tweetSortation" class="display-none" />
                        </div>
                    </div>
                </div>
                <div class="write-button">
                    <div class="write-button-ok" onclick="createHtml()">确定</div>
                    <div class="write-button-cancel" onclick="closeWriteDiv()">取消</div>
                </div>
            </div>
        </div>

	</div>

</body>
</html>